
import fs from  'fs'
import Root from  './Root.js'
export default   class  NodeRoot extends Root{
    constructor(rootPath){
        super(rootPath)
    }
      load(dir){
        let _this=this;
          return new Promise(function (resolve, reject) {
              fs.readFile(_this.rootPath+"/"+dir, function(err, data) {
                  if (err) {
                      reject(err);
                  } else {
                      //  console.log(data);
                      resolve(data);
                  }
              });
          });
    }


}